Bridging applications and databases is a longstanding problem. In 1996, Carey and DeWitt outlined why many technologies, including object-oriented databases and persistent programming languages, did not gain wide acceptance due to limitations in query and update processing, transaction throughput, and scalability. They speculated that object-relational (O/R) databases would dominate in 2006. Indeed, DB2® and Oracle® database systems include a built-in object layer that uses a hardwired O/R mapping on top of a conventional relational engine. However, the O/R features offered by these systems appear to be rarely used for storing enterprise data, with the exception of multimedia and spatial data types. Among the reasons are data and vendor independence, the cost of migrating legacy databases, scale-out difficulties when business logic runs inside the database instead of the middle tier, and insufficient integration with programming languages.
Since mid 1990's, client-side data mapping layers have gained popularity, fueled by the growth of Internet applications. A core function of such a layer is to provide an updatable view that exposes a data model closely aligned with the application's data model, driven by an explicit mapping. Many commercial products and open source projects have emerged to offer these capabilities. Virtually every enterprise framework provides a client-side persistence layer (e.g., EJB in J2EE). Most packaged business applications, such as ERP and CRM applications, incorporate proprietary data access interfaces (e.g., BAPI in SAP R/3)
One widely used open source Object-Relational Mapping (ORM) framework for Java® is Hibernate®. It supports a number of inheritance mapping scenarios, optimistic concurrency control, and comprehensive object services. The latest release of Hibernate conforms to the EJB 3.0 standard, which includes the Java Persistence Query Language. On the commercial side, popular ORMs include Oracle TopLink® and LLBLGen®. The latter runs on the .NET platform. These and other ORMs are tightly coupled with the object models of their target programming languages.
BEA® recently introduced a new middleware product called the AquaLogic Data Services Platform® (ALDSP). It uses XML Schema for modeling application data. The XML data is assembled using XQuery from databases and web services. ALDSP's runtime supports queries over multiple data sources and performs client-side query optimization. The updates are performed as view updates on XQuery views. If an update does not have a unique translation, the developer needs to override the update logic using imperative code. ALDSP's programming surface is based on service data objects (SDO).
Today's client-side mapping layers offer widely varying degrees of capability, robustness, and total cost of ownership. Typically, the mapping between the application and database artifacts used by ORMs has vague semantics and drives case-by-case reasoning. A scenario-driven implementation limits the range of supported mappings and often yields a fragile runtime that is difficult to extend. Few data access solutions leverage data transformation techniques developed by the database community, and often rely on ad hoc solutions for query and update translation.
Database research has contributed many powerful techniques that can be leveraged for building persistence layers. And yet, there are significant gaps. Among the most critical ones is supporting updates through mappings. Compared to queries, updates are far more difficult to deal with as they need to preserve data consistency across mappings, may trigger business rules, and so on. As a consequence, commercial database systems and data access products offer very limited support for updatable views. Recently, researchers have turned to alternative approaches, such as bidirectional transformations.
Traditionally, conceptual modeling has been limited to database and application design, reverse-engineering, and schema translation. Many design tools use UML. Only very recently conceptual modeling started penetrating industry-strength data mapping solutions. For example, the concept of entities and relationships surfaces both in ALDSP and EJB 3.0. ALDSP overlays E-R-style relationships on top of complex-typed XML data, while EJB 3.0 allows specifying relationships between objects using class annotations.
Schema mapping techniques are used in many data integration products, such as Microsoft® BizTalk Server®, IBM® Rational Data Architect®, and ETL® tools. These products allow developers to design data transformations or compile them from mappings to translate e-commerce messages or load data warehouses.